package com.mjlf.cloud.streamhello.service;

import com.mjlf.cloud.streamhello.StreamhelloApplication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

/**
 * @auther a123
 * @create 2018-03-01 10:18
 * @desc
 */
@EnableBinding(Sink.class)
public class SinkReceiver {

    private static Logger logger = LoggerFactory.getLogger(StreamhelloApplication.class);

    @StreamListener(Sink.INPUT)
    public void receive(Object payload){
        logger.info("received : " + payload);
    }
}
